import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2023-11-27
 * Time: 21:00
 */
public class TestDemo {
    public static void main(String[] args) {
        List<Character> ret = func("welcome tocvte", "come");
        for (char ch:ret
             ) {
            System.out.print(ch+" ");
        }
    }

    public static List<Character> func(String str1,String str2){
        List<Character> list = new ArrayList<>();
        for (int i = 0; i < str1.length(); i++) {
            char ch = str1.charAt(i);
            if (!str2.contains(ch+"")){
                list.add(ch);
            }
        }
        return list;
    }

    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
       // myArrayList.add(1,5);
        //myArrayList.contains(8);
        myArrayList.display();
        //myArrayList.indexOf(5);
        myArrayList.remove(4);
        myArrayList.display();


    }
}
